#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2018 crane <crane@crane-pc>
#
# Distributed under terms of the MIT license.

"""

"""
# @param: n: An integer
# @return: An integer, denote the number of trailing zeros in n!
def trailingZeros(n):
    # write your code here, try to do it without arithmetic operators.
    result = 0
    base = 5
    while n >= base:
        result += n // base
        base *= 5

    return result


def main():
    print("start main")
    print(trailingZeros(11))
    print(trailingZeros(25))
    print(trailingZeros(26))
    print(trailingZeros(100))
    print(trailingZeros(10000))


if __name__ == "__main__":
    main()
